package com.linwl.plume.config;

import com.plumelog.trace.aspect.AbstractAspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @className: AspectConfig
 * @author: linwl
 * @desc:
 * @date: 2025/2/7
 **/
@Aspect
@Component
public class AspectConfig extends AbstractAspect {

    // 定义切点：拦截所有Controller层的请求
    @Pointcut("execution(* com.linwl.plume.*.controller..*(..))")
    public void controllerPointcut() {}


    @Around("controllerPointcut()")
    public Object around(JoinPoint joinPoint) throws Throwable {
        return aroundExecute(joinPoint);
    }
}
